package cn.qzuie.smart.module.dorm.controller.admin.dormitories.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;
import cn.qzuie.smart.framework.excel.core.annotations.DictFormat;
import cn.qzuie.smart.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 宿舍 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DormitoriesRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "21132")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "楼栋", requiredMode = Schema.RequiredMode.REQUIRED, example = "32177")
    @ExcelProperty("楼栋")
    private Long buildingId;

    @Schema(description = "门牌号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("门牌号")
    private String roomNo;

    @Schema(description = "宿舍类型：'单人间','双人间','四人间','六人间'", example = "2")
    @ExcelProperty(value = "宿舍类型：'单人间','双人间','四人间','六人间'", converter = DictConvert.class)
    @DictFormat("dorm_room_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer roomType;

    @Schema(description = "房价", requiredMode = Schema.RequiredMode.REQUIRED, example = "15830")
    @ExcelProperty("房价")
    private BigDecimal price;

    @Schema(description = "入住人数", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("入住人数")
    private Integer currentOccupancy;

    @Schema(description = "状态:'空闲','已满','维修中'", example = "2")
    @ExcelProperty(value = "状态:'空闲','已满','维修中'", converter = DictConvert.class)
    @DictFormat("dorm_room_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer status;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
